package com.wanmait.recycle.service;

import java.util.List;
import java.util.Map;

import com.github.pagehelper.PageInfo;
import com.wanmait.recycle.pojo.Admin;
import com.wanmait.recycle.pojo.Secondtype;
import com.wanmait.recycle.pojo.Userinfo;

public interface SecondtypeService extends CommonService<Secondtype> {
	PageInfo<Secondtype> findAllByPager();
	
	List<Secondtype> findAll();

	void insert(Secondtype object);
	
	void update(Secondtype object);
	
	void deleteById(Integer id);
	
	void deleteByIds(String ids);
	
	void addSecondtype(String name,Integer type1Id,String pic,String content,Admin admin);
	
	void insertById(Integer id);
	
	void recallById(Integer id);
	
	PageInfo<Secondtype> findAllBySearch(String searchStr,String beginTime,String endTime);

	void userAddSecondtype(String objectName, Integer firsttypeId, String pic, String content, Userinfo userinfo);
	
	Integer findMaxId();

	void realDelete(Integer objectId);
		
	// 根据一级分类查找二级分类列表 3.6 ad 
	List<Secondtype> findAllByFirsttypeId(Integer id);

	Secondtype findBySecondtypeNameAndContent(String objectName, String content);
	//更改第二类型的顺序
	void changeSortCount(Integer tid, Integer count);

	boolean judgeIfRepetition(String objectName);

	Object findAllByPrimarykey(Integer nScId);

	Map<Integer,Integer> getSonNum();

	void updateSecondtypeById(Integer id, String name, Integer firsttypeId, String pic, String content, Admin admin);
	
}
